/*
	[{"date":"2015-12-1", "temperature":"37.5"}, ...] => customerDateTemperatureMap(date, temperature)
	类似的有与日期相关的其他key-value Map
	依赖于MapUtil.js
*/
  
  function getCustomerDateArray(str){
  	var customerDateArray = new Array();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++)
			customerDateArray[i] = tempJSONArray[i].date;
	}
    
    return customerDateArray;
  }
  
  function getDateTemperatureMap(str){

  	var customerDateTemperatureMap = new Map();

    if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;


		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerTemperature = tempJSONArray[i].temperature;

			customerDateTemperatureMap.put(customerDate, customerTemperature);
		}
    }
    
    return customerDateTemperatureMap;
  }
  
  function getDatePeriodMap(str){
  	var customerDatePeriodMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerPeriod = tempJSONArray[i].period;

			customerDatePeriodMap.put(customerDate, customerPeriod);
		}
    }
    
    return customerDatePeriodMap;
  }
  
  function getDateHeartMap(str){
  	var customerDateHeartMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerHeart = tempJSONArray[i].heart;

			customerDateHeartMap.put(customerDate, customerHeart);
		}
    }
    
    return customerDateHeartMap;
  }
  
  function getDateMoonMap(str){
  	var customerDateMoonMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerMoon = tempJSONArray[i].moon;

			customerDateMoonMap.put(customerDate, customerMoon);
		}
	}
    
    return customerDateMoonMap;
  }
  
  function getDateMedicineMap(str){
  	var customerDateMedicineMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerMedicine = tempJSONArray[i].medicine;

			customerDateMedicineMap.put(customerDate, customerMedicine);
		}
	}
    
    return customerDateMedicineMap;
  }
  
  function getDatePlaneMap(str){
  	var customerDatePlaneMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerPlane = tempJSONArray[i].plane;

			customerDatePlaneMap.put(customerDate, customerPlane);
		}
	}
    
    return customerDatePlaneMap;
  }
  
  function getDateDrinkMap(str){
  	var customerDateDrinkMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerDrink = tempJSONArray[i].drink;

			customerDateDrinkMap.put(customerDate, customerDrink);
		}
    }

    return customerDateDrinkMap;
  }
  
  function getDateMucusMap(str){
  	var customerDateMucusMap = new Map();

  	if(str != null){
		var tempJSONArray = JSON.parse(str);
		var tempJSONArrayLen = tempJSONArray.length;

		for(var i = 0; i < tempJSONArrayLen; i ++){
			customerDate = tempJSONArray[i].date;
			customerMucus = tempJSONArray[i].mucus;

			customerDateMucusMap.put(customerDate, customerMucus);
		}
    }

    return customerDateMucusMap;
  }